#!/bin/bash

# Set path to hadoop home dir
# HADOOP_HOME=/home/tulinski/hadoop/hadoop-0.20.2

if [ -z "${HADOOP_HOME+x}" ]; then
	echo "HADOOP_HOME is not defined. Set it at the beginning of the script."
	exit 1
fi

HADOOP=${HADOOP_HOME}/bin/hadoop
EXAMPLES=${HADOOP_HOME}/hadoop-*-examples.jar
# Path to jar must have windows format
EXAMPLES=`cygpath -wp ${EXAMPLES}`

${HADOOP} jar ${EXAMPLES} wordcount input output